<div nz-row class="main">
  <div nz-col nzSpan="10"></div>
  <div nz-col nzSpan="4">
    <h3 nz-title style="margin-top: 250px; text-align: center; color: #fff">
      后台管理系统
    </h3>
    <input
      nz-input
      placeholder="用户名"
      [(ngModel)]="username"
      style="margin-bottom: 20px"
      (keyup)="$event.which === 13 ? login() : 0"
    />
    <nz-input-group [nzSuffix]="suffixTemplate" style="margin-bottom: 20px">
      <input
        [type]="passwordVisible ? 'text' : 'password'"
        nz-input
        placeholder="密码"
        [(ngModel)]="password"
        (keyup)="$event.which === 13 ? login() : 0"
      />
    </nz-input-group>
    <ng-template #suffixTemplate>
      <i
        nz-icon
        [nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
        (click)="passwordVisible = !passwordVisible"
      ></i>
    </ng-template>
    <button nz-button nzType="primary" nzBlock (click)="login()">登录</button>
  </div>
  <div nz-col nzSpan="10"></div>
</div>
